package inc;

import android.os.Parcel;
import android.os.Parcelable;

public class Member implements Parcelable{
    private String name;
    private int expanse;
    
    public Member(String name){
    	this.setName(name);
    	this.setExpanse(0);
    }

	public int getExpanse() {
		return expanse;
	}

	public void setExpanse(int expanse) {
		this.expanse = expanse;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	//parcel methods
	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(name);
		dest.writeInt(expanse);
	}
	

	public Member(Parcel in) {
		this.name = in.readString();
		this.expanse = in.readInt();
	}
	
	public static final Parcelable.Creator<Member> CREATOR = new Parcelable.Creator<Member>() {
		public Member createFromParcel(Parcel in) {
			return new Member(in);
		}

		public Member[] newArray(int size) {
			return new Member[size];
		}
	};
}
